// 库存相关API接口
import request from '../request'

export default {
  // 获取库存列表
  getInventoryList(params) {
    return request.get('/inventory/list', params)
  },
  
  // 获取库存详情
  getInventoryDetail(id) {
    return request.get(`/inventory/${id}`)
  },
  
  // 搜索库存
  searchInventory(params) {
    return request.get('/inventory/search', params)
  },
  
  // 获取库存统计
  getInventoryStats() {
    return request.get('/inventory/stats')
  },
  
  // 获取库存预警
  getInventoryWarnings(params) {
    return request.get('/inventory/warnings', params)
  },
  
  // 更新库存
  updateInventory(id, data) {
    return request.put(`/inventory/${id}`, data)
  },
  
  // 批量更新库存
  batchUpdateInventory(data) {
    return request.put('/inventory/batch', data)
  },
  
  // 获取库存变动记录
  getInventoryHistory(id, params) {
    return request.get(`/inventory/${id}/history`, params)
  },
  
  // 导出库存数据
  exportInventory(params) {
    return request.get('/inventory/export', params)
  },
  
  // 获取库存分类
  getInventoryCategories() {
    return request.get('/inventory/categories')
  },
  
  // 获取库存位置
  getInventoryLocations() {
    return request.get('/inventory/locations')
  },
  
  // 扫码查询库存
  scanInventory(code) {
    return request.get('/inventory/scan', { code })
  }
} 